package main //必须有个main包

import "fmt"

func main() {
	m := map[int]string{1: "aaa", 2: "bbb"}
	for key, value := range m {
		fmt.Printf(" \t %d ===> %s \n ", key, value)
	}

	value, flag := m[2]
	if flag == true {
		fmt.Println(" key存在, value = ", value)
	} else {
		fmt.Println(" key不存在 ! ")
	}

}
